package Others.DesignPattern.AbstractFactoryPattern.Pattern.Object2;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SQLData {

    private String SQL;


    public IUser createUser()
    {


        return switch (SQL) {
            case "MySQL" -> new MySQLUser();
            case "Oracle" -> new OracleUser();
            default -> null;
        };
    }

    public IDepartment createDepartment()
    {
        return switch (SQL) {
            case "MySQL" -> new MySQLDepartment();
            case "Oracle" -> new OracleDepartment();
            default -> null;
        };
    }

}
